package com.yuwj.chinaa.adapter;

import android.content.Context;
import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yuwj.chinaa.R;
import com.yuwj.chinaa.entity.EntityNews;
import com.yuwj.chinaa.util.DateUtil;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
 * 新闻记录adapter
 */
public class NewsAdapter extends BaseQuickAdapter<EntityNews, BaseViewHolder> {
    Context context;
    Calendar calendar;

    public NewsAdapter(Context context, List<EntityNews> datas) {
        super(R.layout.item_news, datas);
        this.context = context;
        calendar = Calendar.getInstance();
    }

    @Override
    protected void convert(BaseViewHolder holder, final EntityNews item) {
        holder.setText(R.id.tv_time,item.getCreateTime());
        holder.setText(R.id.tv_title,item.getNewTitle());
        holder.setText(R.id.tv_content,item.getNewDes());
    }

}
